using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Joy.Erp.BasicArchives.Core.Filters;

namespace Joy.Erp.BasicArchives.Procurements
{
    public interface IPurchaseOrderAppService
    {
        Task<PurchaseOrderDto> GetAsync(Guid id);
        Task<PurchaseOrderLineDto> GetChildAsync(Guid id);
        Task<PurchaseOrderDto> FindAsync(string filter);
        Task<PurchaseOrderDto> FindBySourceKeyAsync(string sourceKey, string sourceType);
        Task<PagedResultDto<PurchaseOrderDto>> GetListAsync(FilterRequestDto input);
        Task<PagedResultDto<PurchaseOrderDto>> QueryAsync(FilterGroupRequestDto input);
        Task<PagedResultDto<PurchaseOrderLineDto>> QueryChildrenAsync(FilterGroupRequestDto input);
        Task<PurchaseOrderDto> CreateAsync(PurchaseOrderCreateDto input);
        Task<PurchaseOrderDto> UpdateAsync(Guid id, PurchaseOrderUpdateDto input);
        Task<PurchaseOrderDto> SubmitAsync(Guid id);
        Task<PurchaseOrderDto> ApproveAsync(Guid id);
        Task<PurchaseOrderDto> UnApproveAsync(Guid id);
        Task DeleteAsync(Guid id);
        Task<List<PurchaseOrderDto>> BatchCreateAsync(List<PurchaseOrderCreateDto> inputs, bool useBulk = false);
        Task<List<PurchaseOrderDto>> BatchUpdateAsync(List<PurchaseOrderBatchUpdateDto> inputs, bool useBulk = false);
        Task BatchDeleteAsync(List<Guid> ids, bool useBulk = false);
    }
}